package com.zhyonk.domain;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author cbl
 * @description com.zhyonk.domain
 * @date 2020/7/15
 */
@Data
@TableName("item_query_info")
public class ItemQueryInfo {
    //uuid
    @TableId("query_id")
    private Long queryId;
    //对应结果
    private Long resultId;
    //页面标题
    private String pageTitle;
    //未观看完整视频提示
    private String unwatchFinishText;
    //位于上传页面上面的提示文字
    private String indexPromptUnderPhoto;
    //上传照片图标
    private String uploadPhotoIcon;
    //input的描述。中间用"|"隔开。如果有多个
    private String inputDescs;

    //input的描述。中间用"|"隔开。如果有多个
    @TableField(exist = false)
    private List<Map<String,Object>> inputDescsList = new ArrayList<>();

    public String getInputDescs() {
        return inputDescs;
    }

    public void setInputDescs(String inputDescs) {
        this.inputDescs = inputDescs;
        if (StrUtil.contains(inputDescs,"|")){
            String[] split = inputDescs.split("\\|");
            for(String item : split){
                HashMap<String, Object> hashMap = new HashMap<>();
                hashMap.put("name",item);
                hashMap.put("value",null);
                inputDescsList.add(hashMap);
            }
        }
    }

    //该页面主体颜色
    private String mainColor;
    //未上传图片开始测试-提示
    private String unUploadImgPromptText;
    //更多测试
    private String moreToolTitle;
    //下一个页面的路径
    private String nextPagePath;
    //接入的广告位ID
    private String videoAdUnitId;
    //主页类型
    private int indexType;

    private int firstBlockTop;
    //开始测试-按钮颜色
    private String startTestBtnColor;
    //开始测试-上传图片前的文字
    private String startTestBtnBeforText;
    //开始测试-上传图片后的文字
    private String startTestBtnAfterText;
    //开始测试-业务逻辑接口
    private String startTestBtnApi;
    //首页banner图片
    private String bannerImgLink;
    //分享-默认标题
    private String shareDefaultTitle;
    //分享-默认描述
    private String shareDefaultDesc;
    //分享-默认路径
    private String shareDefaultPath;
    //分享-默认Icon
    private String shareDefaultImageUrl;
    //分享-默认模板ID
    private String shareDefaultTemplateId;
    //分享-视频标题
    private String shareVideoTitle;
    //分享描述
    private String shareVideoDesc;
    //分享-页面路径
    private String shareVideoPath;
    //分享-视频-话题、传数组进来或者按某种规律分割
    private String shareVideoExtraVideoTopics;

    private int showShare;

    private int isShowAd;
}
